<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>TestTempSetPointParameterized</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">TestTempSetPointParameterized</td></tr>
</thead><tbody>
<tr>
    <td>open</td>
    <td>http://localhost:8080/Tests/TestTempSetPointParameterized</td>
    <td></td>
</tr>
<tr>
    <td>assertTitle</td>
    <td>Parameterized Temperature Set Point</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//div[@id='main_content']//label</td>
    <td>Temperature set point:</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>??.?</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-unknown</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointstate</td>
    <td>current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointstate@class</td>
    <td>tempsetpoint-current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointdisplay@class</td>
    <td>tempsetpoint-unknown</td>
</tr>
<!-- Set up to use the widget event router -->
<tr>
    <td>log</td>
    <td>Set up to use the widget event router</td>
    <td></td>
</tr>
<tr>
    <td>getWidgetEventRouter</td>
    <td>myuri:myzone</td>
    <td></td>
</tr>
<tr>
    <td>pause</td>
    <td>1000</td>
    <td></td>
</tr>
<!-- Set current value event -->
<tr>
    <td>log</td>
    <td>Set current value event</td>
    <td></td>
</tr>
<tr>
    <td>publishEvent</td>
    <td>myuri:SetCurrentEvent</td>
    <td>15 </td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>15.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-current</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointstate</td>
    <td>current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointstate@class</td>
    <td>tempsetpoint-current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointdisplay@class</td>
    <td>tempsetpoint-current</td>
</tr>
<!-- Show target for 2 seconds -->
<tr>
    <td>publishEvent</td>
    <td>myuri:ShowTargetEvent</td>
    <td>2</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>10.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointstate</td>
    <td>set point</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointstate@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointdisplay@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>pause</td>
    <td>3250</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>15.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-current</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointstate</td>
    <td>current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointstate@class</td>
    <td>tempsetpoint-current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointdisplay@class</td>
    <td>tempsetpoint-current</td>
</tr>
<!-- Set target value -->
<!-- Set target value with event -->
<tr>
    <td>log</td>
    <td>Set target value with event</td>
    <td></td>
</tr>
<tr>
    <td>publishEvent</td>
    <td>myuri:SetTargetEvent</td>
    <td>19.5</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>15.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-current</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointstate</td>
    <td>current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointstate@class</td>
    <td>tempsetpoint-current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointdisplay@class</td>
    <td>tempsetpoint-current</td>
</tr>
<!-- Show target for 2 seconds -->
<tr>
    <td>publishEvent</td>
    <td>myuri:ShowTargetEvent</td>
    <td>2</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>19.5</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointstate</td>
    <td>set point</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointstate@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointdisplay@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>pause</td>
    <td>2500</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>15.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-current</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointstate</td>
    <td>current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointstate@class</td>
    <td>tempsetpoint-current</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointdisplay@class</td>
    <td>tempsetpoint-current</td>
</tr>
<!-- Create, subscribe and set target event listener -->
<tr>
    <td>log</td>
    <td>Create, subscribe and set target event listener</td>
    <td></td>
</tr>
<tr>
    <td>storeEventListener</td>
    <td>myuri:SetTargetEvent</td>
    <td>settargetlistener</td>
</tr>
<!-- Click button to bump up target value -->
<!-- (first click activates display) -->
<tr>
    <td>log</td>
    <td>Click button to bump up target value</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//setpointwidget//setpointup</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//setpointwidget//setpointup</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>20.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointstate</td>
    <td>set point</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointstate@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointdisplay@class</td>
    <td>tempsetpoint-target</td>
</tr>
<!-- Wait for display to revert -->
<tr>
    <td>pause</td>
    <td>1503</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>20.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>pause</td>
    <td>2003</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>20.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>waitForText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>15.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-current</td>
</tr>
<!-- Bump down target value twice -->
<!-- (first click activates display) -->
<tr>
    <td>log</td>
    <td>Bump down target value twice</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//setpointwidget//setpointdown</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//setpointwidget//setpointdown</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//setpointwidget//setpointdown</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>19.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<!-- Wait for display to revert -->
<tr>
    <td>pause</td>
    <td>3754</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>19.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>waitForText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>15.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-current</td>
</tr>
<!-- Bump down target value 3 times at 1-second intervals -->
<!-- (first click activates display) -->
<tr>
    <td>log</td>
    <td>Bump down target value 3 times at 1-second intervals</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//setpointwidget//setpointdown</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>19.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>pause</td>
    <td>1005</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//setpointwidget//setpointdown</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>18.5</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>pause</td>
    <td>1005</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//setpointwidget//setpointdown</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>18.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>pause</td>
    <td>1005</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>//setpointwidget//setpointdown</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>17.5</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<!-- Wait for display to revert -->
<tr>
    <td>pause</td>
    <td>3505</td>
    <td></td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>17.5</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-target</td>
</tr>
<tr>
    <td>waitForText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>15.0</td>
</tr>
<tr>
    <td>verifyAttribute</td>
    <td>//setpointwidget//setpointvalue@class</td>
    <td>tempsetpoint-current</td>
</tr>
<!-- Set current value for some other subject -->
<tr>
    <td>log</td>
    <td>Set current value for some other subject</td>
    <td></td>
</tr>
<tr>
    <td>getWidgetEventRouter</td>
    <td>myuri:myzone1</td>
    <td></td>
</tr>
<tr>
    <td>publishEvent</td>
    <td>myuri:SetCurrentEvent</td>
    <td>25</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>15.0</td>
</tr>
<tr>
    <td>getWidgetEventRouter</td>
    <td>myuri:myzone</td>
    <td></td>
</tr>
<tr>
    <td>publishEvent</td>
    <td>myuri:SetCurrentEvent</td>
    <td>22</td>
</tr>
<tr>
    <td>verifyText</td>
    <td>//setpointwidget//setpointvalue</td>
    <td>22.0</td>
</tr>
<!--End of test-->
</tbody></table>
</body>
</html>
